package com.example.dao.impl;


import android.database.sqlite.SQLiteDatabase;

import com.example.bean.User;
import com.example.dao.DaoInterface;
import com.example.utils.MySdliteDataBase;

/**
 * Created by User on 2015/6/25.
 */
public class UserDaoImpl implements DaoInterface {


    private MySdliteDataBase myDb;


    public UserDaoImpl() {
        this.myDb = new MySdliteDataBase();
    }

    @Override
    public void DaoInterface(User user) {

        SQLiteDatabase helper=myDb.getReadableDatabase();


        StringBuffer stringBuffer=new StringBuffer().append("insert into user(UID,NAME) values (").append(user.getuId()).append(",").append(user.getName()).append(")");
        helper.execSQL(stringBuffer.toString());



    }
}
